package D240606;

public class Day {
    String name;
    int ordinal;
    public static final Day MONDAY = new Day("MONDAY", 0);
    public static final Day TUESDAY = new Day("TUESDAY", 1);
    public static final Day WEDNESDAY = new Day("WEDNESDAY", 2);
    public static final Day THURSDAY = new Day("THURSDAY", 3);
    public static final Day FRIDAY = new Day("FRIDAY", 4);
    public static final Day SATURDAY = new Day("SATURDAY", 5);
    public static final Day SUNDAY = new Day("SUNDAY", 6);

    private Day(String name, int ordinal) {
        this.name = name;
        this.ordinal = ordinal;
    }

    public String name() {
        return this.name;
    }

    public int ordinal() {
        return this.ordinal;
    }

    @Override
    public String toString() {
        return this.name;
    }
}
